<template>
	<view class="p30">
		<view class="p30 bg-fff radius20">
			<view class="fw-w fs30">注销账号</view>
			<view class="pt30">
				<text>{{$user.mobile&&$user.mobile.replace(/^(\d{3})\d+(\d{4})$/,"$1****$2")}}</text>
				<text class="color-999 fs24 ml20">注销账号为当前所绑定的账号</text>
			</view>
			<view class="">
				<u-form-item>
					<view class="flex w-max">
						<view class="flex1">
							<u-input v-model="code"></u-input>
						</view>
						<tips :mobile="$user.mobile" type="verify" slot="right" />
					</view>
				</u-form-item>
			</view>
		</view>
		<view class="h120"></view>
		<view class="pf bottom0 left0 w-max flex  bg-fff">
			<view class="p20 flex1">
				<u-button type="warning" ripple @click="submit()">提交</u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				feedback: '',
				code: '',
			};
		},
		onLoad(e) {

		},
		methods: {
			submit() {
				let params = {
					...this.$params,
					code: this.code
				}
				this.$request('/master/my/logoff', params).then(res => {
					this.$msg(res.msg)
					this.$setData('token', '')
					this.$jump('/pages/login/login', '', 'reLaunch')
				})
			}
		}
	}
</script>

<style lang="scss">

</style>